package cn.cheqi.recovery.api.mapper;

import cn.cheqi.recovery.api.entity.Order;
import cn.cheqi.recovery.api.vo.OrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Robin
 * @since 2020-02-23
 */
@Repository("apiOrderMapper")
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 查出所有订单的信息,包含业主信息和员工信息
     * @return
     */
    List<OrderVO> findAllOrders();


    /**
     * 通过订单ID列出订单详情,包含该订单所属的业主信息和回收员工信息
     * @param orderId
     * @return
     */
    OrderVO findOrderDetailsByOrderId(@Param("orderId") Long orderId);

}
